package com.jiac.coderunner.controller;

import com.jiac.coderunner.util.DBInfo;
import com.jiac.coderunner.util.OutputJson;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/table")
public class TableController {

    @RequestMapping("/list")
    public OutputJson getTables() {
        OutputJson opjson = new OutputJson();
        List<Map<String,Object>> tables =  DBInfo.getTables();
        opjson.setObj(tables);
        return opjson;
    }
}
